package chixing.day18.synchronized_demo;

public class AccountTest {
    public static void main(String[] args) {
        Account acc = new Account("katy",500);

        for (int i = 0;i<1000;i++){
            AccountThread accountThread = new AccountThread(acc);
            accountThread.start();
        }
        try {
            Thread.sleep(100000);
        } catch (InterruptedException e) {
            throw new RuntimeException(e);
        }
        System.out.println("-------------账户余额是--------------" + acc.getBanlance());
    }
}
